class CreateCustomers < ActiveRecord::Migration[5.1]
  def change
    create_table :customers do |t|
      t.string :name, comment: '用户公司名'
      t.string :short_name, comment: '公司简称/缩写'
      t.string :master_mobile, comment: '管理员手机'
      t.string :master_name, comment: '管理员姓名'
      t.integer :status, default: 1, comment: '状态'
      t.boolean :active, default: true, comment: '是否可用'

      t.timestamps
    end

    add_index :customers, :name
    add_index :customers, :short_name
    add_index :customers, :status
    add_index :customers, :active
  end
end
